package gizwits.supor.function;

import gizwits.kit.HttpKit2;

public class Test {
	
	private static final String url = "http://gizwits.supor-cloud.xtremeprog.com/api/eShop/getByProductKey";
	
	public static void main(String[] args){
//		Map<String,Object> params = new HashMap<String,Object>();
//		params.put("productKey", "af58e7c91b534655923463b95e45d870");
//		System.out.println(HttpKit2.put(url, data).post(url, JSONObject.toJSONString(params)));
		System.out.println("=======开始========");
		new Thread(){
			@Override
			public void run() {
				for(int i=0;i<20;i++){
					System.out.println("线程1："+System.currentTimeMillis()+":"+HttpKit2.get("http://localhost/api/star/score/addScore?userId=0c87f227fd574ea28f7fc001c41b81f6"));
//					try {
//						Thread.sleep(100);
//					} catch (InterruptedException e) {
//						// TODO Auto-generated catch block
//						e.printStackTrace();
//					}
				}
			}
		}.start();
		
		new Thread(){
			@Override
			public void run() {
				for(int i=0;i<20;i++){
					System.out.println("线程2："+System.currentTimeMillis()+":"+HttpKit2.get("http://localhost/api/star/score/addScore?userId=0c87f227fd574ea28f7fc001c41b81f6"));
//					try {
//						Thread.sleep(100);
//					} catch (InterruptedException e) {
//						// TODO Auto-generated catch block
//						e.printStackTrace();
//					}
				}
			}
		}.start();
		
		new Thread(){
			@Override
			public void run() {
				for(int i=0;i<20;i++){
					System.out.println("线程3："+System.currentTimeMillis()+":"+HttpKit2.get("http://localhost/api/star/score/addScore?userId=0c87f227fd574ea28f7fc001c41b81f6"));
//					try {
//						Thread.sleep(100);
//					} catch (InterruptedException e) {
//						// TODO Auto-generated catch block
//						e.printStackTrace();
//					}
				}
			}
		}.start();
		
		new Thread(){
			@Override
			public void run() {
				for(int i=0;i<20;i++){
					System.out.println("线程4："+System.currentTimeMillis()+":"+HttpKit2.get("http://localhost/api/star/score/addScore?userId=0c87f227fd574ea28f7fc001c41b81f6"));
//					try {
//						Thread.sleep(100);
//					} catch (InterruptedException e) {
//						// TODO Auto-generated catch block
//						e.printStackTrace();
//					}
				}
			}
		}.start();
		
		new Thread(){
			@Override
			public void run() {
				for(int i=0;i<20;i++){
					System.out.println("线程5："+System.currentTimeMillis()+":"+HttpKit2.get("http://localhost/api/star/score/addScore?userId=0c87f227fd574ea28f7fc001c41b81f6"));
//					try {
//						Thread.sleep(100);
//					} catch (InterruptedException e) {
//						// TODO Auto-generated catch block
//						e.printStackTrace();
//					}
				}
			}
		}.start();
		
	}

}
